<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="MyDrafts.aspx.cs" Inherits="MyDrafts" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="static/js/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />

    <script src="static/js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {

            $("#dialog").dialog({
                modal: true,
                autoOpen: false,
                buttons: {
                    "Close": function() {
                        $(this).dialog("close");
                    }
                },
                open: function(type, data) {
                    $(this).parent().appendTo("form");
                }
            });

        });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="Server">
    <div class="mbox">
        <h1>
            <a href="#">My Drafts</a></h1>
        <div class="text">
            <table cellpadding="2" cellspacing="0" border="0" style="width: 100%">
                <tr>
                    <td colspan="2">
                        <h3 style="margin: 0">
                            Composed Messages</h3>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:GridView ID="gvMessages" runat="server" CellPadding="4" ForeColor="#333333"
                            GridLines="Vertical" AutoGenerateColumns="False">
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField HeaderText="Send this">
                                    <ItemTemplate>
                                        <a id="lnk" onclick="$('#<%=hdfItemCode.ClientID %>').val('<%# Eval("Message_Code") %>'); $('#<%=hdfItemType.ClientID %>').val('Message'); $('#dialog').dialog('open');">
                                            Send</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Message_Subject" HeaderText="Subject" />
                                <asp:BoundField DataField="Message_Body" HeaderText="Body" />
                            </Columns>
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#999999" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <h3 dir="ltr" style="margin: 0">
                            Uploaded Documents</h3>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:GridView ID="gvUploadedDocs" runat="server" CellPadding="4" ForeColor="#333333"
                            GridLines="Vertical" Width="100%">
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField HeaderText="Send this">
                                    <ItemTemplate>
                                        <a id="lnk" onclick="$('#<%=hdfItemCode.ClientID %>').val('<%# Eval("Document_Code") %>'); $('#<%=hdfItemType.ClientID %>').val('Document'); $('#dialog').dialog('open');">
                                            Send</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#999999" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
        <div class="footer">
            <div class="bookmarks">
                <a href="Default.aspx">Go to Home</a>
            </div>
            <a title="Folders" href="AddFolder.aspx">Manage Folders</a> | <a href="Compose.aspx">
                Compose a Message</a> | <a href="UploadDocument.aspx">Upload a Documents</a>
        </div>
    </div>
    <div id="dialog" title="Share">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
            <ContentTemplate>
                <table border="0">
                    <tr>
                        <td>
                            Select Department:&nbsp;
                        </td>
                        <td>
                            &nbsp;
                            <asp:DropDownList ID="ddlDept" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDept_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Select User:
                        </td>
                        <td>
                            &nbsp;
                            <asp:DropDownList ID="ddlUsers" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HiddenField ID="hdfItemCode" runat="server" />
                            <asp:HiddenField ID="hdfItemType" runat="server" />
                            <asp:Label ID="lblStatus" runat="server" ForeColor="Red" Visible="False" />
                        </td>
                        <td>
                            &nbsp;
                            <asp:Button ID="btnShare" runat="server" OnClick="btnShare_Click" Text="Share" OnClientClick="this.style.display='none';" />
                            &nbsp;&nbsp;
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSide" runat="Server">
</asp:Content>
